// 通用错误页面样式
// 用于显示各种类型错误的友好界面
// 通用错误页面容器
.general-error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

// 错误内容容器
.error-content {
    text-align: center;
    max-width: 700px;
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    // 玻璃态效果
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        z-index: -1;
    }
}

// 错误图标
.error-icon {
    margin-bottom: 2rem;
    .el-icon {
        font-size: 5rem;
        color: #9b59b6;
        animation: bounce 2s ease-in-out infinite;
    }
}

// 错误标题
.error-title {
    font-size: 6rem;
    font-weight: 700;
    color: #9b59b6;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(155, 89, 182, 0.3);
    animation: slideInDown 0.8s ease-out;
}

// 错误副标题
.error-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 1.5rem 0;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

// 错误描述
.error-description {
    color: #718096;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

// 错误详情区域
.error-details {
    margin-bottom: 2rem;
    text-align: left;
    animation: slideInUp 0.8s ease-out 0.6s both;
    details {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 1rem;
        background: #f9fafb;
        summary {
            cursor: pointer;
            font-weight: 500;
            color: #374151;
            margin-bottom: 0.5rem;
            &:hover {
                color: #1f2937;
            }
        }
    }
    .error-stack {
        background: #1f2937;
        color: #f3f4f6;
        padding: 1rem;
        border-radius: 6px;
        font-size: 0.875rem;
        line-height: 1.5;
        overflow-x: auto;
        white-space: pre-wrap;
        margin: 0;
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    }
}

// 错误建议区域
.error-suggestions {
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease-out 0.8s both;
    .suggestions-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 1rem;
        margin-top: 0;
    }
    .suggestions-list {
        list-style: none;
        padding: 0;
        margin: 0;
        max-width: 500px;
        margin: 0 auto;
        .suggestion-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            transition: all 0.3s ease;
            .el-icon {
                color: #9b59b6;
                font-size: 1.25rem;
                flex-shrink: 0;
            }
            &:hover {
                background: #f0f4ff;
                border-color: #9b59b6;
                transform: translateX(4px);
            }
        }
    }
}

// 操作按钮区域
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease-out 1s both;
    .el-button {
        min-width: 140px;
        height: 44px;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.3s ease;
        .el-icon {
            margin-right: 0.5rem;
        }
    }
    .primary-btn {
        background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
        border: none;
        color: white;
        &:hover {
            background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(155, 89, 182, 0.4);
        }
    }
    .back-btn {
        border: 2px solid #e2e8f0;
        color: #4a5568;
        background: white;
        &:hover {
            border-color: #9b59b6;
            color: #9b59b6;
            background: #f8f5ff;
            transform: translateY(-2px);
        }
    }
    .home-btn {
        border: 2px solid #e2e8f0;
        color: #4a5568;
        background: white;
        &:hover {
            border-color: #9b59b6;
            color: #9b59b6;
            background: #f8f5ff;
            transform: translateY(-2px);
        }
    }
    .reload-btn {
        border: 2px solid #e2e8f0;
        color: #4a5568;
        background: white;
        &:hover {
            border-color: #48bb78;
            color: #48bb78;
            background: #f0fff4;
            transform: translateY(-2px);
        }
    }
}

// 联系支持区域
.support-section {
    animation: slideInUp 0.8s ease-out 1.2s both;
    .support-text {
        color: #718096;
        font-size: 0.875rem;
        margin-bottom: 1rem;
        margin-top: 0;
    }
    .support-btn {
        border: 2px solid #e2e8f0;
        color: #4a5568;
        background: white;
        &:hover {
            border-color: #48bb78;
            color: #48bb78;
            background: #f0fff4;
            transform: translateY(-2px);
        }
    }
}

// 动画效果
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

// 响应式设计
@media (max-width: 768px) {
    .general-error-page {
        padding: 1rem;
        min-height: 70vh;
    }
    .error-content {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    .error-title {
        font-size: 4rem;
    }
    .error-subtitle {
        font-size: 1.25rem;
    }
    .error-description {
        font-size: 1rem;
    }
    .error-suggestions {
        .suggestions-list {
            .suggestion-item {
                padding: 0.5rem 0.75rem;
                font-size: 0.875rem;
            }
        }
    }
    .action-buttons {
        flex-direction: column;
        align-items: center;
        .el-button {
            width: 100%;
            max-width: 200px;
        }
    }
}

@media (max-width: 480px) {
    .error-content {
        padding: 1.5rem 1rem;
    }
    .error-title {
        font-size: 3rem;
    }
    .error-subtitle {
        font-size: 1.125rem;
    }
    .error-suggestions {
        .suggestions-list {
            .suggestion-item {
                flex-direction: column;
                text-align: center;
                gap: 0.5rem;
                .el-icon {
                    font-size: 1rem;
                }
                font-size: 0.8rem;
            }
        }
    }
    .error-details {
        .error-stack {
            font-size: 0.75rem;
            padding: 0.75rem;
        }
    }
}